package com.example.service.impl;

import com.example.entity.Delivery;
import com.example.entity.StuDelivery;
import com.example.mapper.DeliveryMapper;
import com.example.service.DeliveryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cyk
 * @since 2022-02-19
 */
@Service
public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> implements DeliveryService {

    @Autowired
    DeliveryMapper deliveryMapper;

    @Override
    public List<Delivery> getStuDelivery(Long id) {
        return deliveryMapper.getStuDelivery(id);
    }

    @Override
    public Delivery getDelivery(Long stuid, Long recid) {
        return deliveryMapper.getDelivery(stuid, recid);
    }

    @Override
    public int upDelivery(Long id) {
        return deliveryMapper.upDelivery(id);
    }

    @Override
    public int agreeDelivery(Long id) {
        return deliveryMapper.agreeDelivery(id);
    }

    @Override
    public int refuseDelivery(Long id) {
        return deliveryMapper.refuseDelivery(id);
    }

    @Override
    public int saveDelivery(Delivery delivery) {
        return deliveryMapper.saveDelivery(delivery);
    }

    @Override
    public Delivery find(Delivery delivery) {
        return deliveryMapper.find(delivery);
    }

    @Override
    public Delivery delDelivery(Long id) {
        return deliveryMapper.delDelivery(id);
    }

    @Override
    public List<StuDelivery> stuDelivery(Long id) {
        return deliveryMapper.stuDelivery(id);
    }
}
